package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;
import org.springframework.beans.BeanUtils;

/**
 * @ClassName: ProjectForMydepartmentRequestConvert
 * @Description: SQLRequestConvert
 * @Author: SDP
 * @Date: 2022-07-15
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectForMydepartmentRequestConvert {
    public static ProjectForMydepartment convert(ProjectForMydepartmentRequest request) {
        ProjectForMydepartment daoRequest = new ProjectForMydepartment();
        BeanUtils.copyProperties(request, daoRequest);

        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setPcode(daoRequest.getPcode() == null ? null : daoRequest.getPcode().trim());
        daoRequest.setIcon(daoRequest.getIcon() == null ? null : daoRequest.getIcon().trim());
        daoRequest.setCreateTime(daoRequest.getCreateTime() == null ? null : daoRequest.getCreateTime().trim());
        daoRequest.setPath(daoRequest.getPath() == null ? null : daoRequest.getPath().trim());

        return daoRequest;
    }
}
